package com.winter.admin.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

/**
 * @author zhangshuaiyin
 * @date 2021-06-21 14:37
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ToString
public class MenuVO {
    @ApiModelProperty(value = "主键id，自动递增")
    private Integer id;

    @ApiModelProperty(value = "父节点id")
    private Integer parentId;

    @ApiModelProperty(value = "路径")
    private String path;

    @ApiModelProperty(value = "重定向地址")
    private String redirect;

    @ApiModelProperty(value = "组件路径")
    private String component;

    @ApiModelProperty(value = "命名")
    private String name;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty("菜单属性")
    private Meta meta;

    @ApiModelProperty(value = "是否隐藏，默认不隐藏")
    private Boolean hidden;

    @ApiModelProperty("子级菜单")
    private List<MenuVO> children;

    @Data
    public static class Meta {
        @ApiModelProperty(value = "标题")
        private String title;

        @ApiModelProperty(value = "图标")
        private String icon;
    }
}
